<script setup>
import DraggableTree from './components/DraggableTree.vue'
</script>

<template>
  <div class="app-container">
    <header>
      <h1>Vue3 + Ant Design Vue 可拖拽树组件</h1>
      <div class="description">
        <p>功能特点：</p>
        <ul>
          <li>可以拖拽至同级节点上方或下方或与节点重合，动作时会显示对应提示</li>
          <li>节点重合功能，重合节点时子节点会合并到目标节点上</li>
          <li>节点限制为同级拖拽移动或合并，不能跨级操作</li>
        </ul>
      </div>
    </header>

    <main>
      <DraggableTree />
    </main>
  </div>
</template>

<style>
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: #f0f2f5;
}

.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  color: #000;
  height: 100%;
}

header {
  margin-bottom: 30px;
  text-align: center;
}

h1 {
  color: #1890ff;
  font-size: 28px;
}

.description {
  background-color: #fff;
  padding: 15px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin: 20px 0;
  text-align: left;
}

ul {
  padding-left: 20px;
}

li {
  margin-bottom: 10px;
}

main {
  background-color: #fff;
  border-radius: 4px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  min-height: 400px;
}
</style>
